package com.ssh.service;

import com.ssh.dao.IResourceInfoDAO;
import com.ssh.model.ResourceInfo;

public class ResourceInfoService implements IResourceInfoService {
    private IResourceInfoDAO resourceInfoDAO;
	@Override
	public ResourceInfo findResourceInfoById(long id) {
		ResourceInfo resourceInfo=null;
		try{
			resourceInfo=resourceInfoDAO.findResourceInfoById(id);
		}catch(Exception e){
			e.printStackTrace();
		}
		return resourceInfo;
	}

	@Override
	public void saveResourceInfoService(ResourceInfo resourceInfo) {
	
		try{
			resourceInfoDAO.saveResourceInfo(resourceInfo);
		}catch(Exception e){
			e.printStackTrace();
		}
	}

	public void setResourceInfoDAO(IResourceInfoDAO resourceInfoDAO) {
		this.resourceInfoDAO = resourceInfoDAO;
	}

	public IResourceInfoDAO getResourceInfoDAO() {
		return resourceInfoDAO;
	}

}
